import java.util.Scanner;
public class ShoppingTest {

    public static void test(){

    }
    static SuperMarket huihui;
    public static void main(String[] args) {

        huihui = new SuperMarket();

        huihui.setMarketName("灰灰超市");

        Goods[] g = new Goods[1];

        for (int i = 0; i < g.length; i++) {

            g[i] = new Goods();

        }

        g[0].setIndex(0);
        g[0].setName("平板");
        g[0].setPrice(1000);

        huihui.setGoodList(g);


        Member[] m = new Member[2];
        for (int i = 0; i < m.length; i++) {
            m[i] = new Member();
        }

        m[0].setUserName("李淳罡");
        m[0].setPassWord("111111");

        m[1].setUserName("yun");
        m[1].setPassWord("8888888");

        huihui.setMembers(m);

        System.out.println("----------欢迎来到" + huihui.getMarketName() + "购物------------");
        System.out.println("请输入用户名");

        Scanner scanner = new Scanner(System.in);

        String userName;
        userName = scanner.nextLine();
        System.out.println("请输入密码");
        String passWord;
        passWord = scanner.nextLine();
        Member[] members;
        members=huihui.getMembers();
        for (int i = 0; i <huihui.getMembers().length; i++) {
            Member member = huihui.getMembers()[i];
            if (userName.equals(member.userName)) {
                System.out.println("用户名在会员系统中");
            }
        }


    }
}
